package at.ac.tuwien.dse.health.reservation;

import com.google.common.base.Objects;

import java.io.Serializable;

/**
 * @author Bernhard Nickel
 * @author Gregor Schauer
 * @author Dominik Strasser
 */
public class ReservationRequest implements Serializable{
	private long doctorId;

	private long patientId;

	private String type;

	private int radius;

	public ReservationRequest(long doctorId, long patientId, String type, int radius) {
		this.doctorId = doctorId;
		this.patientId = patientId;
		this.type = type;
		this.radius = radius;
	}

	/**
	 * Returns the doctor id
	 * @return doctor id
	 */
	public long getDoctorId() {
		return doctorId;
	}

	/**
	 * Returns the patient id
	 * @return patient id
	 */
	public long getPatientId() {
		return patientId;
	}

	/**
	 * Returns the type of the needed slot
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * Returns the max distance calculates from the patient's location in km
	 * @return max distance
	 */
	public int getRadius() {
		return radius;
	}

	@Override
	public String toString() {
		return Objects.toStringHelper(this)
				.add("doctorId", doctorId)
				.add("patientId", patientId)
				.add("type", type)
				.add("radius", radius)
				.toString();
	}
}
